﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            Person someone = new Person();
            someone.firstName = "Вася";
            someone.lastName = "Пупкин";

            Person someoneElse = new Person()
            {
                firstName = "Василий",
                lastName = "Пупыркин"
            };

            Person[] persons = new Person[2];
            persons[0] = someone;
            persons[1] = someoneElse;

            foreach (var person in persons)
            {
                person.Introduce();
            }
        }
    }

    class Person
    {
        public string firstName;
        public string lastName;

        public void Introd()
        {
            Console.WriteLine("Привет, меня зовут {0} {1}", firstName, lastName);
        }
    }
}
